  //LT_LoadRecToVars($opts;LoadSubFieldNum)
  //By: Tony Ringsmuth, 11/13/2002

  //FUNCTION: 
  //For the form that views an individual record, put the fields of the record into the Field Name/value arrays
  //V6.0 to 2004
  //ASSUMPTIONS:
  //The record must be loaded into the blob: vLT_RecBlob   
  //See Also: LT_LoadRecFromLogToBlob
  //--------------------------------------------------------------------------------
  //PARAMETERS
  //$1: Longint: Bitwise Options
  //$2: Load Subfield number (v2004)

  //--------------------------------------------------------------------------------
  //REVISION HISTORY
  //11/26/10: New

  //--------------------------------------------------------------------------------

C_LONGINT($1;$opts)
C_LONGINT($2;$iLoadSubFieldOrBlobNum)
C_LONGINT($iSize;$iAdrRecStart;$iByteOrdering;$Offset_i;$iTotalRecordSize;$iFixedDataSize;$CountFields_i;$iVariableFieldsExist;$iSubtablesExist;$iLastRecordByte;$iBlobSize;$iOriginalCountFields)
C_LONGINT($iYear;$iMonth;$iDay)
C_TIME($Time)
C_PICTURE($NullPict)

C_LONGINT(LT_Rec_Blob_SourceElement)

$opts:=0
If (Count parameters>0)
$opts:=$1
End if 

$iLoadSubFieldOrBlobNum:=0
If (Count parameters>1)
$iLoadSubFieldOrBlobNum:=$2
End if 

LT_CreateDocBlob:=($opts ?? 0)  //+1
$IgnoreWarnings:=(($opts ?? 1) | Shift down)  //+2
$LoadLargeFields:=($opts ?? 2)  //+4
$LoadDataToFields:=($opts ?? 3)  //+8   `LogToolsComponent Only
$FormatForTableView:=($opts ?? 4)  //+16

LT_ErrMsgOut:=""
LT_IgnoreWarnings:=$IgnoreWarnings

If ($iLoadSubFieldOrBlobNum>0)
ARRAY TEXT(LT_aSubTableData;0;0)
ARRAY INTEGER(LT_aSubTable_ColType;0)
End if 

SET BLOB SIZE(LT_BlobFieldOutput;0)  //If we are directed to output a single blob.

C_TEXT(LT_Rec_TableName)
C_LONGINT(LT_Rec_OperationSize\
;LT_Rec_ProcessNo\
;LT_Rec_UserID\
;LT_Rec_TableNo\
;LT_Rec_ActionID\
;LT_Rec_RecNum\
;LT_LastFieldRead\
;LT_Rec_LogTimeMS\
;LT_Rec_LocalTimeMS\
;LT_Rec_Context1_i)
C_TIME(LT_Rec_LogTime;LT_Rec_LocalTime)

LT_Rec_OperationSize:=0
LT_Rec_TableNo:=0
LT_Rec_TableName:=""

LT_Rec_LogDate:=!00-00-00!
LT_Rec_LogTime:=(?00:00:00?)
LT_Rec_LogTimeMS:=0

LT_Rec_LocalDate:=!00-00-00!
LT_Rec_LocalTime:=(?00:00:00?)
LT_Rec_LocalTimeMS:=0

LT_Rec_ProcessNo:=0
LT_Rec_UserID:=0
LT_Rec_UserName_t:=""
LT_Rec_Action:=""
LT_Rec_ActionID:=0
LT_Rec_RecNum:=-1
LT_RecLoadProblems:=False
LT_LastFieldRead:=0  //in case of errors, this contains the number of the last field read.
LT_Rec_TableUUID:=""
LT_Rec_MachineOwner:=""
LT_Rec_MachineName:=""
LT_Rec_ProcessName:=""
LT_Rec_Context1_i:=0

C_LONGINT(LT_Rec_BlobID;LT_Rec_ExBlobData_Size;LT_Rec_ExBlobData_StartOffset)
LT_Rec_BlobID:=-1
LT_Rec_ExBlobData_Size:=-1
LT_Rec_ExBlobData_StartOffset:=-1
SET BLOB SIZE(LT_Rec_BlobData_x;0)

C_REAL(LT_Rec_OperationSeqNum_r)
LT_Rec_OperationSeqNum_r:=0

C_TEXT(LT_Rec_PrimKey_t)
LT_Rec_PrimKey_t:=""

  //C_LONGINT(LT_Rec_OperationSeqNum1;LT_Rec_OperationSeqNum2)  //8 byte longint: V11 only
  //LT_Rec_OperationSeqNum1:=0
  //LT_Rec_OperationSeqNum2:=0

ARRAY TEXT(LT_aVBag_Name;0)
ARRAY TEXT(LT_aVBag_Data;0)
ARRAY INTEGER(LT_aVBag_Type;0)


ARRAY INTEGER(LT_aRec_FieldNum;0)
ARRAY TEXT(LT_aRec_FieldName;0)
ARRAY TEXT(LT_aRec_FieldValue;0)
ARRAY TEXT(LT_aRec_Note;0)
ARRAY TEXT(LT_aRec_FieldTypeDesc;0)
ARRAY INTEGER(LT_aRec_FieldType_Log;0)
ARRAY INTEGER(LT_aRec_FieldType_4D;0)
ARRAY TEXT(LT_aRec_FieldValLarge;0)
ARRAY PICTURE(LT_aRec_FieldPict;0)
ARRAY REAL(LT_aRec_SrcPrmID;0)

ARRAY POINTER(LT_aRec_Group;0)
APPEND TO ARRAY(LT_aRec_Group;->LT_aRec_FieldNum)
APPEND TO ARRAY(LT_aRec_Group;->LT_aRec_FieldName)
APPEND TO ARRAY(LT_aRec_Group;->LT_aRec_FieldValue)
APPEND TO ARRAY(LT_aRec_Group;->LT_aRec_Note)
APPEND TO ARRAY(LT_aRec_Group;->LT_aRec_FieldTypeDesc)
APPEND TO ARRAY(LT_aRec_Group;->LT_aRec_FieldType_Log)
APPEND TO ARRAY(LT_aRec_Group;->LT_aRec_FieldType_4D)
APPEND TO ARRAY(LT_aRec_Group;->LT_aRec_FieldValLarge)
APPEND TO ARRAY(LT_aRec_Group;->LT_aRec_FieldPict)
APPEND TO ARRAY(LT_aRec_Group;->LT_aRec_SrcPrmID)

SET BLOB SIZE(LT_DocumentBlob;0)

$Abort:=False

$iBlobSize:=BLOB size(LT_Rec_Blob_x)

$bShow:=False | (Macintosh option down & (Is compiled mode=False))


Case of 
: ($iBlobSize>=36)
  //See Also: LT_V11Format
If (True)  //Header


C_LONGINT($Offset_i;$iContextID1;$iContextID2;$idb4d;$iHeaderEnd_Offset)
$Offset_i:=0

LT_Operation_ParseHdr (->LT_Rec_Blob_x;->$Offset_i)
LT_Rec_OperationSeqNum_r:=OpHdr_OpSeqNum_r
LT_Rec_OperationSize:=OpHdr_Size_i
LT_Rec_ActionID:=OpHdr_ActType_i
LT_Rec_Context1_i:=OpHdr_Context1

LT_DateTimeFromReal (OpHdr_DateTime_r)
LT_Rec_LogDate:=LT_vDate
LT_Rec_LogTime:=LT_vTime_h
LT_Rec_LogTimeMS:=LT_vTimeMS

LT_DateTimeFromReal (OpHdr_DateTime_r;<>GMTOffsetHours)

LT_Rec_LocalDate:=LT_vDate
LT_Rec_LocalTime:=LT_vTime_h
LT_Rec_LocalTimeMS:=LT_vTimeMS

End if   //true

Case of 
: ((LT_Rec_ActionID=<>LT_Action_Add_1)\
 | (LT_Rec_ActionID=<>LT_Action_Modify_V11_2)\
 | (LT_Rec_ActionID=<>LT_Action_RecCrt_PrmKey_24)\
 | (LT_Rec_ActionID=<>LT_Action_RecMod_PrmKey_25))

  //See Also: LT_V11Format
  //PrimKeyprim_key (for 24 & 25)
  //RecordHeader   (28 bytes total)
  //          Int32          'rec1'      1-4
  //          Int32          size         5-8:        Note: the first field meta-data starts at the position pointed to by this word
  //          TimeStamp          time_stamp   (8 bytes)      9-16
  //          Int32          checksum       `17-20
  //          Int32          record_number      `21-24
  //          Int32          TableNumber       `25-28   (04/21/2009: not in original documentation: Discovered by Tony Ringsmuth)
  //          Int32          count_fields            `29-32

  //after this:  (by Tony Ringsmuth)
  //          UUID       (16 bytes)
  //          {Field1_Data}     Variable Length: determined by Field1_DataType.  
  //          {Field2_Data}     Variable Length: determined by Field2_DataType.  
  //          {FieldN_Data}    Variable Length: determined by Field3_DataType.  

  //                   RecSize points to Field1_DataPositionStart
  //          {Field1_DataPositionStart}    /* Int32 */
  //          {Field1_DataType}                  /* Int32 */
  //          {Field2_DataPositionStart}    /* Int32 */
  //          {Field2_DataType}                  /* Int32 */
  //          {FieldN_DataPositionStart}    /* Int32 */
  //          {FieldN_DataType}                  /* Int32 */

If ((LT_Rec_ActionID=<>LT_Action_RecCrt_PrmKey_24) | (LT_Rec_ActionID=<>LT_Action_RecMod_PrmKey_25))
LT_Rec_PrimKey_t:=LT_PrimKeys_Read (->LT_Rec_Blob_x;->$Offset_i)
End if 

$rec1_t:=BLOB to text(LT_Rec_Blob_x;Mac text without length;$Offset_i;4)  //"rec1"   1-4
$RecSize_i:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)  //5-8

C_REAL($DateTime_Toss_r)
$DateTime_Toss_r:=LT_4DV11DateTimeStampToReal (->LT_Rec_Blob_x;->$Offset_i)  //9-16
  //$iRecMilliseconds:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)  //9-12
  //$iRecYearMonthDay:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)  //13-16
$CheckSum_i:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)  //17-20
LT_Rec_RecNum:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)  //21-24
LT_Rec_TableNo:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)  //25-28  NOTE: This is the table number in the DATA, but not necessarily in the structure.  (if tables ever deleted, then they will mismatch)
$CountFields_i:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)  //29-32

If ($CountFields_i<0) | ($CountFields_i>MAXINT)
LT_ConsoleHandle ("WriteToConsole";"Operaion ID: "+String(LT_Rec_OperationSeqNum_r)+": Field count is: "+String($CountFields_i))
End if 

LT_Rec_TableUUID:=BB_UUIDFromBlob (->LT_Rec_Blob_x;->$Offset_i)  //33-48

If (<>UUIDsFix_201603_b)
$FindTableByUUID_i:=Find in array(<>LT_aStrTable_UUID;LT_Rec_TableUUID)
If ($FindTableByUUID_i>-1)
LT_Rec_TableNo:=<>LT_aStrTable_Num{$FindTableByUUID_i}
Else 
  //In this case, LT_Rec_TableNo may be un-reliable:  it's the table number in the data, but not but not necessarily in the structure.  (if tables ever deleted, then they will mismatch)
End if 
Else 

If (<>CheckForTableUUIDMismatch)
If (LT_Rec_TableNo>0)
$iFindTableByNumber:=Find in array(<>LT_aStrTable_Num;LT_Rec_TableNo)
$FindTableByUUID_i:=Find in array(<>LT_aStrTable_UUID;LT_Rec_TableUUID)
If ($iFindTableByNumber>-1) & ($FindTableByUUID_i>-1)
If ($iFindTableByNumber#$FindTableByUUID_i)
LT_ConsoleHandle ("WriteToConsole";"Operaion ID: "+String(LT_Rec_OperationSeqNum_r)+": Mismatch between Table Number and UUID")
End if 
End if 
End if 
End if 
End if 

C_LONGINT($iField1_DataStart;$iFieldDataOffset;$iMetaDataOffset;$iByte)
$iField1_DataStart:=$Offset_i
  //$TableUUID:=BLOB to text(LT_Rec_Blob;Text without length ;$iOffset;16)  `33-48

If (False)
$Hex:=BB_BlobToHexText (->LT_Rec_Blob_x;$Offset_i;-1;1)  //output the rest
SET TEXT TO PASTEBOARD($Hex)
End if 
If (False)
OutputBlobAsHexEditor (->LT_Rec_Blob_x;$Offset_i)
End if 

$iMetaDataOffset:=$iField1_DataStart+$RecSize_i  //Where the 8 byte sets of (Position, field type) begins


If ($bShow)
$it:=""
C_LONGINT($iX1)
$p:=->LT_Rec_Blob_x
$it:=$it+OutputBlobAsHexEditor ($p;$iX1+36;4;4;"Record Header (rec1)")  //Record Header: should be "rec1" 
$it:=$it+OutputBlobAsHexEditor ($p;$iX1+40;4;4;"RecordSize";0;Is longint)
$it:=$it+OutputBlobAsHexEditor ($p;$iX1+44;4;4;"DateTime_MS";0;Is longint)
$it:=$it+OutputBlobAsHexEditor ($p;$iX1+48;2;2;"DateTime_D_M";0;Is integer)
$it:=$it+OutputBlobAsHexEditor ($p;$iX1+50;2;2;"DateTime_YYYY";0;Is integer)+Char(13)
$it:=$it+OutputBlobAsHexEditor ($p;$iX1+52;4;4;"CheckSum";0;Is longint)
$it:=$it+OutputBlobAsHexEditor ($p;$iX1+56;4;4;"Rec Num";0;Is longint)
$it:=$it+OutputBlobAsHexEditor ($p;$iX1+60;4;4;"Table Num";0;Is longint)
$it:=$it+OutputBlobAsHexEditor ($p;$iX1+64;4;4;"Field Count";0;Is longint)
$it:=$it+OutputBlobAsHexEditor ($p;$iX1+68;16;16;"TableUUID")+Char(13)

$iTempDataStart:=$iX1+68+16
$iTempDataStart:=84
$iRecAddressTableStart:=$iX1+$iTempDataStart+$RecSize_i
$it:=$it+Char(9)+"**Note: Rec Address Table should start at "+String($iRecAddressTableStart)+"( datastart "+String($iTempDataStart)+"+ RecordSize "+String($RecSize_i)+")"+Char(13)+Char(13)


  //$it:=$it+OutputBlobAsHexEditor ($p;$iX1+84;$iRecSize;4;"Field Data")+Char(13)  `Record Data

$AddressOutput:=""
$TempRecData:=""
For ($TempFieldCnt_i;1;$CountFields_i)
$TempAddr_i:=$iRecAddressTableStart+(8*($TempFieldCnt_i-1))
$AddrStart_i:=BLOB to longint($p->;PC byte ordering;$TempAddr_i)
$TempAddr_i:=$TempAddr_i-4
If (False)
$AddressOutput:=$AddressOutput+OutputBlobAsHexEditor ($p;$TempAddr_i;4;4;"Field Offset Address "+String($TempFieldCnt_i)+": "+String($iTempDataStart+$AddrStart_i);0;Is longint)
$AddressOutput:=$AddressOutput+OutputBlobAsHexEditor ($p;$TempAddr_i+4;4;4;"Field Type "+String($TempFieldCnt_i);0;Is longint)
Else 
$AddressOutput:=$AddressOutput+OutputBlobAsHexEditor ($p;$TempAddr_i;8;8;"Field "+String($TempFieldCnt_i)+": Address: "+String($iTempDataStart+$AddrStart_i)+",  Type";0;Is longint)
End if 

If ($TempFieldCnt_i<$CountFields_i)
$iNextAddress:=$iRecAddressTableStart+(8*($TempFieldCnt_i-1+1))
$iNextAddress:=BLOB to longint($p->;PC byte ordering;$iNextAddress)
$iLength:=$iNextAddress-$AddrStart_i
Else 
$iLength:=$iRecAddressTableStart-$iTempDataStart-$AddrStart_i
End if 

$TempRecData:=$TempRecData+OutputBlobAsHexEditor ($p;$iTempDataStart+$AddrStart_i;$iLength;0;"Field "+String($TempFieldCnt_i)+" Data")
End for 

$it:=$it+$TempRecData+Char(13)
$it:=$it+$AddressOutput+Char(13)

$it:=$it+Char(13)
$it:=$it+OutputBlobAsHexEditor ($p;$TempAddr_i+8;4;4;"Op Size Ftr";0;Is longint)
$it:=$it+OutputBlobAsHexEditor ($p;$TempAddr_i+12;4;4;"Operation End Tag")+Char(13)+Char(13)  //DB4D

SET TEXT TO PASTEBOARD($it)
End if 

BB_SizeArrayGroup ($CountFields_i;->LT_aRec_Group)
For ($iFieldCtr;1;$CountFields_i)

$iThisFieldDataStart_Offset:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$iMetaDataOffset)  //1-4
$DataType_i:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$iMetaDataOffset)  //1-4

$iThisFieldDataStart_Offset:=$iField1_DataStart+$iThisFieldDataStart_Offset  //Now it's in the right place.

LT_aRec_FieldNum{$iFieldCtr}:=$iFieldCtr
LT_aRec_FieldName{$iFieldCtr}:=LT_FieldName_Get (LT_Rec_TableNo;$iFieldCtr)
LT_aRec_FieldType_Log{$iFieldCtr}:=$DataType_i

$tValue:=""
$tNote:=""
Case of 
: ($DataType_i=-1)  //Deleted Field
LT_aRec_FieldType_4D{$iFieldCtr}:=-1
LT_aRec_FieldTypeDesc{$iFieldCtr}:="Deleted"

: ($DataType_i=1)  //Boolean
LT_aRec_FieldType_4D{$iFieldCtr}:=Is Boolean
LT_aRec_FieldTypeDesc{$iFieldCtr}:="Boolean"
$iByte:=LT_Rec_Blob_x{$iThisFieldDataStart_Offset}
If ($iByte=1)
$tValue:="True"
Else 
$tValue:="False"
End if 

: ($DataType_i=2)  //Byte
LT_aRec_FieldType_4D{$iFieldCtr}:=Is integer
LT_aRec_FieldTypeDesc{$iFieldCtr}:="Byte"
$tValue:=String(LT_Rec_Blob_x{$iThisFieldDataStart_Offset})


: ($DataType_i=3)  //Integer 16 bit, or "Word"
LT_aRec_FieldType_4D{$iFieldCtr}:=Is integer
LT_aRec_FieldTypeDesc{$iFieldCtr}:="Integer 16"
$tValue:=String(BLOB to integer(LT_Rec_Blob_x;PC byte ordering;$iThisFieldDataStart_Offset))

: ($DataType_i=4)  //  `Integer 32 bit
LT_aRec_FieldType_4D{$iFieldCtr}:=Is longint
LT_aRec_FieldTypeDesc{$iFieldCtr}:="Longint 32"
$tValue:=String(BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$iThisFieldDataStart_Offset))


: ($DataType_i=5)  //Integer 64 bit
LT_aRec_FieldType_4D{$iFieldCtr}:=Is integer 64 bits
LT_aRec_FieldTypeDesc{$iFieldCtr}:="Longint 64"
$tValue:=String(BlobToLongint64 (->LT_Rec_Blob_x;->$iThisFieldDataStart_Offset))  //04/21/2009: ****************   Needs work *****************

: ($DataType_i=6)  //Real
LT_aRec_FieldType_4D{$iFieldCtr}:=Is real
LT_aRec_FieldTypeDesc{$iFieldCtr}:="Real"

  //$iOffsetTest:=$iThisFieldDataStart_Offset
  //$iByteOrdring:=Native real format 
  //$iByteOrdring:=Extended real format 
  //$iByteOrdring:=Macintosh double real format 
$iByteOrdring:=PC double real format
$rReal:=BLOB to real(LT_Rec_Blob_x;$iByteOrdring;$iThisFieldDataStart_Offset)

$tValue:=String($rReal)


: ($DataType_i=7)  //Float
LT_aRec_FieldType_4D{$iFieldCtr}:=Is float
LT_aRec_FieldTypeDesc{$iFieldCtr}:="Float"
$tValue:=String(BLOB to real(LT_Rec_Blob_x;PC byte ordering;$iThisFieldDataStart_Offset))  //04/21/2009: ****************   Needs work *****************


: ($DataType_i=8)  //Date (And Time): 4D Stores Date fields here: but the Time portion is 0000
LT_aRec_FieldType_4D{$iFieldCtr}:=Is date
LT_aRec_FieldTypeDesc{$iFieldCtr}:="Date-Time"

$DateTime_r:=LT_4DV11DateTimeStampToReal (->LT_Rec_Blob_x;->$iThisFieldDataStart_Offset)

If (LT_vTime_i=0)
$tValue:=String(LT_vDate;Internal date short)
Else 
$tValue:=BB_ISODate (LT_vDate;LT_vTime_h)
End if 


: ($DataType_i=9)  //Duration (Milliseconds: Int 64): Note 4D Stores Time fields here.
LT_aRec_FieldType_4D{$iFieldCtr}:=Is time
LT_aRec_FieldTypeDesc{$iFieldCtr}:="Duration"
$tValue:=String(BlobToTime (->LT_Rec_Blob_x;->$iThisFieldDataStart_Offset);HH MM SS)


: ($DataType_i=10)  //See also type 14, 17
LT_aRec_FieldType_4D{$iFieldCtr}:=Is text
LT_aRec_FieldTypeDesc{$iFieldCtr}:="String UTF-16"
$tValue:=Blob_UTF16Text_To_Ascii (->LT_Rec_Blob_x;->$iThisFieldDataStart_Offset)
$tNote:="Length: "+String(Length($tValue))


: ($DataType_i=11)  //Blob (stored with the record, perhaps)
LT_aRec_FieldType_4D{$iFieldCtr}:=Is BLOB
LT_aRec_FieldTypeDesc{$iFieldCtr}:="BLOb Int"
$iDataLength:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$iThisFieldDataStart_Offset)


$iDisplaySizeLimit:=1024
$iLength:=BB_LesserLong ($iDataLength;$iDisplaySizeLimit)
$Text:=BLOB to text(LT_Rec_Blob_x;Mac text without length;$Offset_i;256)

C_LONGINT($iAscii)
For ($i;Length($Text);1;-1)
$iAscii:=Character code($Text[[$i]])
If (($iAscii<32) | ($iAscii>127))
$Text:=Substring($Text;1;$i-1)+"<"+String($iAscii)+">"+Substring($Text;$i+1)
End if 
End for 
If ($iSize>$iDisplaySizeLimit)
$Text:=$Text+"..."
End if 
  //LT_aRec_FieldValue{$iRow}:=LT_aRec_FieldValue{$iRow}+": "+$Text

  //$tValue:=String($iDataLength)+" Bytes: "+$Text
$tNote:="Length: "+String($iDataLength)



: ($DataType_i=12)  //Image
LT_aRec_FieldType_4D{$iFieldCtr}:=Is picture

$ID:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$iThisFieldDataStart_Offset)

If ($ID=0x34504354)  //"4PCT"

Else 
$tValue:="Image ID #"+String($ID)+" (stored outside this record)"
End if 
LT_aRec_FieldTypeDesc{$iFieldCtr}:="Image"


: ($DataType_i=13)  //UUID
LT_aRec_FieldType_4D{$iFieldCtr}:=Is alpha field
LT_aRec_FieldTypeDesc{$iFieldCtr}:="UUID"
C_LONGINT($Temp_i)
$Temp_i:=$iThisFieldDataStart_Offset
$tValue:=BB_UUIDFromBlob (->LT_Rec_Blob_x;->$Temp_i)


: ($DataType_i=14)  //String Stored as separate record
LT_aRec_FieldType_4D{$iFieldCtr}:=Is alpha field
  //If this is a negative number, then:
  //    The field is a text field, marked to store the data outside of the record conditionally based on size, but the size is under the threshold.
  //   Take the positive of the number, and that is the length of the text.
$iBlobNumber:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$iThisFieldDataStart_Offset)
Case of 
  //: ($iBlobNumber=0)
  //LT_aRec_FieldTypeDesc{$iFieldCtr}:="Empty String"

: ($iBlobNumber=-1)
LT_aRec_FieldTypeDesc{$iFieldCtr}:="Empty String (*14, -1)"

: ($iBlobNumber<0)
LT_aRec_FieldTypeDesc{$iFieldCtr}:="String UTF16(*14)"
$iTextLength:=-$iBlobNumber-10  //4/28/09: This is the weirdest thing: They're storing  -(Text Length +10)  as the length prefix.
  //$iThisFieldDataStart_Offset:=$iThisFieldDataStart_Offset-4
$tValue:=Blob_UTF16Text_To_Ascii (->LT_Rec_Blob_x;->$iThisFieldDataStart_Offset;$iTextLength)
$tNote:="Length: "+String(Length($tValue))

: ($iBlobNumber>-1)
LT_aRec_FieldTypeDesc{$iFieldCtr}:="External String"
$tValue:="String Record #"+String($iBlobNumber)

SET BLOB SIZE($xBlob;0)
$iBlobSource:=LT_LoadRecToVars_FindBlob ($iBlobNumber;->$xBlob;LT_Rec_TableUUID)

If ($iBlobSource>-1)
LT_aRec_SrcPrmID{$iFieldCtr}:=<>LT_aData_PrimaryID_r{$iBlobSource}
$iBlobOffset:=0
$tValue:=Blob_UTF16Text_To_Ascii (->$xBlob;->$iBlobOffset;BLOB size($xBlob)\2)
$tNote:="Blob Rec #"+String($iBlobNumber)+": Op ID: "+String(<>LT_aData_PrimaryID_r{$iBlobSource})+", Length: "+String(Length($tValue))
Else 
$tNote:="Blob Rec #"+String($iBlobNumber)+": Not in any open log file"
End if 
SET BLOB SIZE($xBlob;0)

End case 

: ($DataType_i=15)  //Subtable
LT_aRec_FieldType_4D{$iFieldCtr}:=Is subtable
  //64 bit integer, like a UUID
LT_aRec_FieldTypeDesc{$iFieldCtr}:="Subtable"
$tValue:=BB_BlobToHexText (->LT_Rec_Blob_x;$iThisFieldDataStart_Offset;16)
  //$tValue:="Subtable"


: ($DataType_i=16)  //Subtable Key
LT_aRec_FieldType_4D{$iFieldCtr}:=Is alpha field
  //64 bit integer, like a UUID
LT_aRec_FieldTypeDesc{$iFieldCtr}:="Subtable Key"
$Temp_i:=$iThisFieldDataStart_Offset
$tValue:=BB_UUIDFromBlob (->LT_Rec_Blob_x;->$Temp_i)
  //$tValue:="Subtable Key"


: ($DataType_i=17)  //String Stored as separate record
LT_aRec_FieldType_4D{$iFieldCtr}:=Is text
TRACE  //04/28/2009: TRR: Haven't seen one of these yet.
LT_aRec_FieldTypeDesc{$iFieldCtr}:="String (type 17)"
$tValue:=Blob_UTF16Text_To_Ascii (->LT_Rec_Blob_x;->$iThisFieldDataStart_Offset)
$tNote:="Length: "+String(Length($tValue))


: ($DataType_i=18)  //Blob (stored elsewhere)
LT_aRec_FieldType_4D{$iFieldCtr}:=Is BLOB
LT_aRec_FieldTypeDesc{$iFieldCtr}:="BLOb Ext"  //04/21/09: I'm guessing that 18 is CLOb
$iBlobNumber:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$iThisFieldDataStart_Offset)
Case of 
: ($iBlobNumber=-1)  //No change since prior save, OR no contents
  //$tValue:="{No Contents, OR No change since prior save}"
$tValue:="{Empty Blob}"


: ($iBlobNumber>-1)
  //An Externally Stored blob:  This is a record number.
SET BLOB SIZE($xBlob;0)
$iBlobSource:=LT_LoadRecToVars_FindBlob ($iBlobNumber;->$xBlob;LT_Rec_TableUUID)
If ($iBlobSource>-1)
LT_aRec_SrcPrmID{$iFieldCtr}:=<>LT_aData_PrimaryID_r{$iBlobSource}

  //$tValue:="{External Blob #"+String($iBlobNumber)+": Op ID: "+String(<>LT_aData_PrimaryID{$iBlobSource})+": Bytes: "+String(BLOB size($xBlob))+",  Data:} "

If (BLOB size($xBlob)>1024)
$iGetSize:=1024
Else 
$iGetSize:=BLOB size($xBlob)
End if 
$Offset_i:=0
$tValue:=BB_BlobToHexText (->$xBlob;$Offset_i;$iGetSize;1)

$tNote:="Blob Rec #"+String($iBlobNumber)+": Op ID: "+String(<>LT_aData_PrimaryID_r{$iBlobSource})+", Bytes: "+String(BLOB size($xBlob))
Else 
$tNote:="Blob Rec #"+String($iBlobNumber)+": Not in any open log file"

End if 
SET BLOB SIZE($xBlob;0)


: ($iBlobNumber<-10)
LT_aRec_FieldTypeDesc{$iFieldCtr}:="BLOb Int"  //04/21/09: I'm guessing that 18 is CLOb
  //11/1/2010: New
$iLength:=-10-$iBlobNumber
$iDestOffset:=0
SET BLOB SIZE($DestBlob;0)
COPY BLOB(LT_Rec_Blob_x;$DestBlob;$iThisFieldDataStart_Offset;$iDestOffset;$iLength)
$Offset_i:=0

$tValue:=BLOB to text($DestBlob;UTF8 text without length)
End case 

: ($DataType_i=19)  //Text in UTF-8
LT_aRec_FieldType_4D{$iFieldCtr}:=Is text
LT_aRec_FieldTypeDesc{$iFieldCtr}:="String UTF-8"
$tValue:=Blob_UTF8Text_To_Ascii (->LT_Rec_Blob_x;->$iThisFieldDataStart_Offset)
$tNote:="Length: "+String(Length($tValue))

: ($DataType_i=21)  //Object (stored in record)
LT_aRec_FieldType_4D{$iFieldCtr}:=38  //Object
LT_aRec_FieldTypeDesc{$iFieldCtr}:="Object"

$iDataLength:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$iThisFieldDataStart_Offset)
$tValue:="Object: length "+String($iDataLength)


Else 
LT_aRec_FieldType_4D{$iFieldCtr}:=-1
LT_aRec_FieldTypeDesc{$iFieldCtr}:="Unknown: "+String($DataType_i)
$tValue:="Type Unknown: "+String($DataType_i)

End case 
LT_aRec_FieldValue{$iFieldCtr}:=$tValue
LT_aRec_Note{$iFieldCtr}:=$tNote
End for 


: (LT_Rec_ActionID=<>LT_Action_Delete_V11_3) | (LT_Rec_ActionID=<>LT_Action_BlobDlt_19)  //19 = Delete Blob
If ($bShow)
$it:=$it+OutputBlobAsHexEditor ($p;$iX1+36;4;4;"Rec Num";0;Is longint)
$it:=$it+OutputBlobAsHexEditor ($p;$iX1+40;16;16;"TableUUID")
End if 
LT_Rec_RecNum:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)  //37-40
LT_LoadRecToVars_TblFromUUID (BB_UUIDFromBlob (->LT_Rec_Blob_x;->$Offset_i))  //41-56  5/2/15 TRR $Offset_i was not previously being incremented here.



: (LT_Rec_ActionID=<>LT_Action_BlobCrt_17) | (LT_Rec_ActionID=<>LT_Action_BlobMod_18)  //17, 18  Create Blob, Modify Blob
  //See also: LT_LoadRecToVars_FindBlob
$Row_i:=0
LT_Rec_BlobID:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)  //37-40
LT_LoadRecToVars_TblFromUUID (BB_UUIDFromBlob (->LT_Rec_Blob_x;->$Offset_i))  //41-56
$iSize:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)  //57-60
LT_Rec_ExBlobData_Size:=$iSize
LT_Rec_ExBlobData_StartOffset:=$Offset_i

$iOffset_PictStart:=$Offset_i

If (BLOB size(LT_Rec_Blob_x)#(36+4+16+4+LT_Rec_ExBlobData_Size+8))  //Op Hdr(16), Blob ID(4), UUID (16), BlobSize(4),  ThisData,  OpFooter(8)
$m:=""
$m:=$m+"Operation ID: "+String(LT_Rec_OperationSeqNum_r)+Char(13)
$m:=$m+"Size of the operation ("+String(BLOB size(LT_Rec_Blob_x))+") did not match Data Size + header & footer size."+Char(13)
$m:=$m+"Header & Footer size: "+String(36+4+16+4+8)+Char(13)
$m:=$m+"Blob Data size: "+String(BLOB size(LT_Rec_Blob_x))+Char(13)

LT1_RecLoadErr (0;104;$m)
Else 

End if 


If (False)
$it:=OutputBlobAsHexEditor (->LT_Rec_Blob_x;0;36;4;"Operation Header")+Char(13)+Char(13)
$it:=$it+OutputBlobAsHexEditor (->LT_Rec_Blob_x;$iHeaderEnd_Offset;4;4;"Blob ID")+Char(13)+Char(13)
$it:=$it+OutputBlobAsHexEditor (->LT_Rec_Blob_x;$iHeaderEnd_Offset+4;16;16;"Table UUID")+Char(13)+Char(13)
$it:=$it+OutputBlobAsHexEditor (->LT_Rec_Blob_x;$iHeaderEnd_Offset+4+16;4;4;"Data Size")+Char(13)+Char(13)

If (LT_Rec_ExBlobData_Size>31000)
$iSize:=31500
Else 
$iSize:=LT_Rec_ExBlobData_Size
End if 
$it:=$it+OutputBlobAsHexEditor (->LT_Rec_Blob_x;$iHeaderEnd_Offset+4+16+4;$iSize;16;"Data")+Char(13)+Char(13)
$it:=$it+OutputBlobAsHexEditor (->LT_Rec_Blob_x;$iHeaderEnd_Offset+4+16+4+$iSize;-1;16;"Operation Footer")+Char(13)+Char(13)
SET TEXT TO PASTEBOARD($it)
End if 


$Row_i:=$Row_i+1
BB_SizeArrayGroup ($Row_i;->LT_aRec_Group)
LT_aRec_FieldName{$Row_i}:="Blob Number"
LT_aRec_FieldValue{$Row_i}:=String(LT_Rec_BlobID)


$Row_i:=$Row_i+1
BB_SizeArrayGroup ($Row_i;->LT_aRec_Group)
LT_aRec_FieldName{$Row_i}:="Table UUID"
LT_aRec_FieldValue{$Row_i}:=LT_Rec_TableUUID+": ["+LT_Rec_TableName+"]"


$Row_i:=$Row_i+1
BB_SizeArrayGroup ($Row_i;->LT_aRec_Group)
LT_aRec_FieldName{$Row_i}:="Blob Size"
LT_aRec_FieldValue{$Row_i}:=String($iSize)+" Bytes"

LT_LoadRecToVars_Blob (->$Offset_i;$iSize;->$Row_i)

If (False)
$i4PCT:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)
If ($i4PCT=0x34504354)  //"4PCT"
$iStreamVersion:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)
$iCountFormats:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)
$iPictBytesSize:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)

$iSizeNextData:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)


$Row_i:=$Row_i+1
BB_SizeArrayGroup ($Row_i;->LT_aRec_Group)
LT_aRec_FieldName{$Row_i}:="Picture Data"
LT_aRec_FieldValue{$Row_i}:="4PCT"

$Row_i:=$Row_i+1
BB_SizeArrayGroup ($Row_i;->LT_aRec_Group)
LT_aRec_FieldName{$Row_i}:="Stream Version"
LT_aRec_FieldValue{$Row_i}:=String($iStreamVersion)

$Row_i:=$Row_i+1
BB_SizeArrayGroup ($Row_i;->LT_aRec_Group)
LT_aRec_FieldName{$Row_i}:="Count Formats"
LT_aRec_FieldValue{$Row_i}:=String($iCountFormats)

$Row_i:=$Row_i+1
BB_SizeArrayGroup ($Row_i;->LT_aRec_Group)
LT_aRec_FieldName{$Row_i}:="Picture Size"
LT_aRec_FieldValue{$Row_i}:=String($iPictBytesSize)+" Bytes"



If ($iSizeNextData>0)
$tUnknown:=BLOB to text(LT_Rec_Blob_x;Mac text without length;$Offset_i;$iSizeNextData)
$iPict:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)  //"pict" in my first analysis
$Offset_i:=$Offset_i+1  //Flags byte
$iVBAG:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)

If ($iVBAG=<>iVBAG)
LT_LoadVBag (->LT_Rec_Blob_x;->$Offset_i)
For ($iCtr;1;Size of array(LT_aVBag_Data))

$Row_i:=$Row_i+1
BB_SizeArrayGroup ($Row_i;->LT_aRec_Group)
LT_aRec_FieldName{$Row_i}:=LT_aVBag_Name{$iCtr}
LT_aRec_FieldValue{$Row_i}:=LT_aVBag_Data{$iCtr}

End for 

End if 

End if 
$iUnknown1:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)




Else 
$iDisplaySizeLimit:=1024
$Offset_i:=$Offset_i-4
$iLength:=BB_LesserLong ($iSize;$iDisplaySizeLimit)
$Text:=BLOB to text(LT_Rec_Blob_x;Mac text without length;$Offset_i;$iLength)

C_LONGINT($iAscii)
For ($i;Length($Text);1;-1)
$iAscii:=Character code($Text[[$i]])
If (($iAscii<32) | ($iAscii>127))
$Text:=Substring($Text;1;$i-1)+"<"+String($iAscii)+">"+Substring($Text;$i+1)
End if 
End for 
If ($iSize>$iDisplaySizeLimit)
$Text:=$Text+"..."
End if 
LT_aRec_FieldValue{$Row_i}:=LT_aRec_FieldValue{$Row_i}+": "+$Text
End if 
End if 


: (LT_Rec_ActionID=<>LT_Action_TrunTable_21)  //Truncate Table

$iNegativeOne:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)  //37-40
LT_LoadRecToVars_TblFromUUID (BB_UUIDFromBlob (->LT_Rec_Blob_x;->$Offset_i))  //5/2/15 TRR $Offset_i was not previously being incremented here.


: (LT_Rec_ActionID=<>LT_Action_ContextCrt_22)  //22 CreateContextWithExtra
  //For this operation, data is stored in a ValueBag with this form:
  //task_id     Long32
  //user_name     String(utf16)                 Same as 4D's "current machine owner" function
  //user4d_id       long32
  //host_name      String             Same as 4D's "current machine" function
  //task_name    String        AKA  Process Name
LT_LoadVBag (->LT_Rec_Blob_x;->$Offset_i)


$Row_i:=0
For ($i;1;Size of array(LT_aVBag_Name))
$Row_i:=$Row_i+1
BB_SizeArrayGroup ($Row_i;->LT_aRec_Group)
LT_aRec_FieldName{$Row_i}:=LT_aVBag_Name{$i}
LT_aRec_FieldValue{$Row_i}:=LT_aVBag_Data{$i}

LT_aRec_FieldType_Log{$Row_i}:=LT_aVBag_Type{$i}
$iFind:=Find in array(<>V11InternalDataType_Num;LT_aVBag_Type{$i})
If ($iFind>-1)
LT_aRec_FieldTypeDesc{$Row_i}:=<>V11InternalDataType_Name{$iFind}
Else 
LT_aRec_FieldTypeDesc{$Row_i}:=String(LT_aVBag_Type{$i})
End if 

End for 

If (False)
OutputBlobAsHexEditor (->LT_Rec_Blob_x;$iOffsetVBagBegin)
End if 

: (LT_Rec_ActionID=<>LT_Action_TransStart_4)  //Start Transaction
  //No additional Information
  //$it:=OutputBlobAsHexEditor (->LT_Rec_Blob;$iOffset;-1;4)  `Operation Header

: (LT_Rec_ActionID=<>LT_Action_BackupStart_20)  //Start Backup
If ($bShow)
$it:=$ShowHdr+OutputBlobAsHexEditor ($p;$iX1+36;4;4;"Unknown";0;Is longint)  //44
$it:=$it+OutputBlobAsHexEditor ($p;$iX1+40;4;4;"Unknown")  //D4BD
  //$it:=$it+OutputBlobAsHexEditor ($p;$iX1+44;4;4;"Unknown")  `zerF:  DB4D is normally followed by a zerF
SET TEXT TO PASTEBOARD($it)
End if 


: (LT_Rec_ActionID=<>LT_Action_SaveSeqNum_23)  //23: Save Sequence Number

C_LONGINT($iSeqNumPartSmall;$iSeqNumPartBig)
$iSeqNumPartSmall:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)  //37-40
$iSeqNumPartBig:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)  //41-44
LT_LoadRecToVars_TblFromUUID (BB_UUIDFromBlob (->LT_Rec_Blob_x;->$Offset_i))  //45-60


$Row_i:=1
BB_SizeArrayGroup ($Row_i;->LT_aRec_Group)
LT_aRec_FieldName{$Row_i}:="Sequence Number"
C_REAL($rReal)
$rReal:=($iSeqNumPartBig*(2^32))+$iSeqNumPartSmall
LT_aRec_FieldValue{$Row_i}:=String($rReal)


: (LT_Rec_ActionID=<>LT_Action_CtxtCrtWthUsrUUID_15)  //CreateContextWithUserUUID=15 ???: seems to be an external ODBC connection
  //01/06/2010
  //    Total record length seems to be 60 (including db4d header & footer)
  //    bytes 37 to 52 (4 groups of 4's) are just zero's
C_LONGINT($Start_i)
$Start_i:=36
$tValue:=BB_UUIDFromBlob (->LT_Rec_Blob_x;->$Start_i)

$Row_i:=1
BB_SizeArrayGroup ($Row_i;->LT_aRec_Group)
LT_aRec_FieldName{$Row_i}:="UUID"
LT_aRec_FieldValue{$Row_i}:=$tValue
LT_aRec_FieldTypeDesc{$Row_i}:="UUID"


: (LT_Rec_ActionID=<>LT_Action_DbClose_8)  //Close Data
If ($bShow)
$it:=$ShowHdr+OutputBlobAsHexEditor ($p;$iX1+36;4;4;"Unknown";0;Is longint)  //44  (2C 00 00 00)
$it:=$it+OutputBlobAsHexEditor ($p;$iX1+40;4;4;"Unknown")  //D4BD  (44 34 42 44)
SET TEXT TO PASTEBOARD($it)
End if 

: (LT_Rec_ActionID=<>LT_Action_ContextClose_16)  //Close Context
If ($bShow)
$it:=$ShowHdr+OutputBlobAsHexEditor ($p;$iX1+36;4;4;"Unknown";0;Is longint)  //44  (2C 00 00 00)
$it:=$it+OutputBlobAsHexEditor ($p;$iX1+40;4;4;"Unknown")  //D4BD  (44 34 42 44)
SET TEXT TO PASTEBOARD($it)
End if 

: (LT_Rec_ActionID=<>LT_Action_TransCan_6)
  //Cancel Transaction


: (LT_Rec_ActionID=<>LT_Action_RecDel_PrmKey_26)
LT_Rec_PrimKey_t:=LT_PrimKeys_Read (->LT_Rec_Blob_x;->$Offset_i)
LT_Rec_RecNum:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)  //37-40
LT_LoadRecToVars_TblFromUUID (BB_UUIDFromBlob (->LT_Rec_Blob_x;->$Offset_i))  //41-56  5/2/15 TRR $Offset_i was not previously being incremented here.



: ((LT_Rec_ActionID=<>LT_Action_BlobCrt_PrmKey_27) | (LT_Rec_ActionID=<>LT_Action_BlobMod_PrmKey_28))
LT_Rec_PrimKey_t:=LT_PrimKeys_Read (->LT_Rec_Blob_x;->$Offset_i)

$FieldNum_i:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)
$BlobNum_i:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)
If ($BlobNum_i=-2)
$SizePath_i:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)
$PathString_i:=BLOB to integer(LT_Rec_Blob_x;PC byte ordering;$Offset_i)
End if 
$TableUUID:=BB_UUIDFromBlob (->LT_Rec_Blob_x;->$Offset_i)  //41-56
$BlobSize_i:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)
If (False)
$DestOffset_i:=0
C_BLOB($Data_x)
COPY BLOB(LT_Rec_Blob_x;$Data_x;$Offset_i;$DestOffset_i;$BlobSize_i)
$Offset_i:=$Offset_i+$BlobSize_i
End if 

LT_LoadRecToVars_TblFromUUID ($TableUUID)

If (LT_Rec_TableNo>0)
$FieldName_t:=LT_FieldName_Get (LT_Rec_TableNo;$FieldNum_i)
End if 

$Row_i:=0

$Row_i:=$Row_i+1
LT_Rec_BlobID:=$BlobNum_i
BB_SizeArrayGroup ($Row_i;->LT_aRec_Group)
LT_aRec_FieldName{$Row_i}:="Blob Number"
LT_aRec_FieldValue{$Row_i}:=String(LT_Rec_BlobID)

$Row_i:=$Row_i+1
BB_SizeArrayGroup ($Row_i;->LT_aRec_Group)
LT_aRec_FieldName{$Row_i}:="Blob Field Number"
LT_aRec_FieldValue{$Row_i}:=String($FieldNum_i)

$Row_i:=$Row_i+1
BB_SizeArrayGroup ($Row_i;->LT_aRec_Group)
LT_aRec_FieldName{$Row_i}:="Blob Field Name"
LT_aRec_FieldValue{$Row_i}:=$FieldName_t


$Row_i:=$Row_i+1
BB_SizeArrayGroup ($Row_i;->LT_aRec_Group)
LT_aRec_FieldName{$Row_i}:="Blob Size"
LT_aRec_FieldValue{$Row_i}:=String($BlobSize_i)+" Bytes"

LT_LoadRecToVars_Blob (->$Offset_i;$BlobSize_i;->$Row_i)


: (LT_Rec_ActionID=<>LT_Action_BlobDel_PrmKey_29)
LT_Rec_PrimKey_t:=LT_PrimKeys_Read (->LT_Rec_Blob_x;->$Offset_i)

  //NEEDS TESTING
$FieldNum_i:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)
$BlobNum_i:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)
If ($BlobNum_i=-2)
$SizePath_i:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)
$PathString_i:=BLOB to integer(LT_Rec_Blob_x;PC byte ordering;$Offset_i)
End if 
$TableUUID:=BB_UUIDFromBlob (->LT_Rec_Blob_x;->$Offset_i)  //41-56
LT_LoadRecToVars_TblFromUUID ($TableUUID)


: (LT_Rec_ActionID=<>LT_Action_CommitStart_30)

: (LT_Rec_ActionID=<>LT_Action_CommitEnd_31)


Else 


End case 

If (True)
  //Note: Activity types of values 2 & 3 were swapped between v2004 & V11.  For ease of programing's sake, we'll swap them back in our code.
Case of 
: (LT_Rec_ActionID=<>LT_Action_Modify_V11_2)
LT_Rec_ActionID:=<>LT_Action_Modify_V2004
: (LT_Rec_ActionID=<>LT_Action_Delete_V11_3)
LT_Rec_ActionID:=<>LT_Action_Delete_V2004
End case 

If (LT_Rec_ActionID=<>LT_Action_ContextCrt_22)  //CreateContextWithExtra

Else 

$iFindContext:=LT_FindContextElement (LT_Rec_Blob_SourceElement)
If ($iFindContext>-1)
LT_Rec_ProcessNo:=<>aContextInfo_4DTaskID{$iFindContext}
LT_Rec_UserID:=<>aContextInfo_UserID{$iFindContext}
$Find_i:=Find in array(<>LT_aUserName_ID;LT_Rec_UserID)
If ($Find_i>-1)
LT_Rec_UserName_t:=<>LT_aUserName_Name{$Find_i}
End if 

LT_Rec_ProcessName:=<>aContextInfo_TaskName{$iFindContext}

LT_Rec_MachineOwner:=<>aContextInfo_MachineOwner{$iFindContext}
LT_Rec_MachineName:=<>aContextInfo_MachineName{$iFindContext}

End if 

End if 
End if 

: ($iBlobSize>=4)

$Offset_i:=0
$iWord1:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)
If ($iWord1=<>zerF)  //zerF


$Row_i:=0
LT_Rec_TableNo:=<>iEndLogFile_TableNum
LT_Rec_TableName:=LT_FieldName_Get (LT_Rec_TableNo)
While (BLOB size(LT_Rec_Blob_x)>($Offset_i+3))
$iWord1:=BLOB to longint(LT_Rec_Blob_x;PC byte ordering;$Offset_i)

$Row_i:=$Row_i+1
BB_SizeArrayGroup ($Row_i;->LT_aRec_Group)
LT_aRec_FieldName{$Row_i}:="Word"
LT_aRec_FieldValue{$Row_i}:=String($iWord1)

End while 
End if 


Else 
  //Not enough header data
If (False)

OutputBlobAsHexEditor (->LT_Rec_Blob_x;0;-1;16;"Unknown")

  //$Hex:=BB_BlobToHexText (->LT_Rec_Blob;0;-1;1)  `output the rest
  //SET TEXT TO CLIPBOARD($Hex)
End if 

End case 



LT_Rec_Action:=LT1_ActionTypeName (LT_Rec_ActionID;1)
LT_Rec_TableName:=LT_FieldName_Get (LT_Rec_TableNo;0)
LT_Rec_UserName:=LT1_GetUserName (LT_Rec_UserID)
LT_RecLoadProblems:=$Abort
  //